from random import *

class Roulette:

    def __init__(self):

        self.players   = int(raw_input("==> number of players"))
        self.games     = int(raw_input("==> number of players"))

        self.playerBet = {}
        self.bet       = []

    def name(self):

        for i in range(self.players):
            name                 = raw_input("==> Please name")
            self.playerBet[name] = raw_input("==> Please bet")
            
    
    def genNumbers(self):

        for i in range(self.games):
            self.bet.append(randint(1,9))


    def checkWin(self):
        
        print "random numbers", self.bet
        gameCounter = 1
        
        for bet in self.bet:
            if str(bet) in self.playerBet.values():
                print "winner game number", gameCounter, "<=>", [key for key, value in self.playerBet.iteritems() if value == str(bet)]
            gameCounter = gameCounter + 1

a = Roulette()
a.name()
a.genNumbers()
a.checkWin()


